home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Programming / MPW Interfaces & Libraries 3.1 / AIncludes / Private.a < prev    next >
Encoding:
Text File  |  1989-10-13  |  29.6 KB  |  761 lines  |  [TEXT/MPS ]

  1. ; Version: 2.83
  2. ; Created: Monday, September 25, 1989 at 10:38:59 AM
  3. ;
  4. ; File: Private.a
  5. ;
  6. ; Assembler Interface to the Macintosh Libraries
  7. ; Copyright Apple Computer, Inc. 1986-1988
  8. ; All Rights Reserved
  9. ;
  10. ;
  11. ; The following information was formerly in "private" files that were
  12. ; not released to the general developer community.
  13. ;
  14. ; The information in this file is not needed for normal application
  15. ; development. These equates and macros were necessary for development
  16. ; of the Macintosh ToolBox and Operating System, and are likely to be
  17. ; dependent on their current implementation. Use of any information
  18. ; in this file is likely to cause your software to fail on future
  19. ; versions of Macintosh system software or hardware.
  20. ;
  21. ; Apple Developer Support will not support any use of the following
  22. ; information.
  23. ;
  24. ; In order to prevent any "accidental" use of this information, it has
  25. ; been disabled using the conditional-assembly variable defined below.
  26. ; If you change this to a non-zero value, you're on your own.
  27. ;___________________________________________________________________________
  28.  
  29.  
  30.  
  31.                 IF            (&TYPE('PrNonPortable') = 'UNDEFINED') THEN
  32. PrNonPortable    EQU         0
  33.                 ENDIF
  34.  
  35.                 IF            PrNonPortable THEN
  36.  
  37.  
  38. ;_______________________________________________________________________
  39. ;
  40. ; System Equates -- These equates supplement the low-level equates for the
  41. ; Macintosh hardware and software defined in SysEqu. These equates are private
  42. ; to Apple Computer, Inc. and should be used solely for building system
  43. ; software.
  44. ;
  45. ;_______________________________________________________________________
  46.  
  47. ;+ Hardware Address Equates (for 512K through 128K Macs)
  48.  
  49. ; Unpacked, user versions of parameter ram
  50.  
  51. SdEnable        EQU         $261                    ; Sound enabled? [byte]
  52.  
  53. ; Event Record Definition
  54.  
  55. evtMax            EQU         $1E                     ; maximum number of events in buffer
  56.  
  57. ; Heap Zone header
  58.  
  59. spare1            EQU         $2C                     ; unused spare [long]
  60.  
  61.  
  62. ; Mouse/Keyboard
  63.  
  64. Tocks            EQU         $173                    ; Lisa sub-tick count [byte]
  65.  
  66. ;Chooser
  67.  
  68. ChooserBits     EQU         $946                    ; bit 7 = 0, don't run; bit 6 = 0, gray out Appletalk
  69. minFree         EQU         12                        ; (minimum block size) for old MemManager
  70. freeTag         EQU         $0                        ; Tag for Free block
  71. nRelTag         EQU         $40000000                ; Tag for Non-Relocatable block
  72. relTag            EQU         $80000000                ; Tag for Relocatable block
  73. minAddr         EQU         $0                        ; Min legal address
  74. maxAddr         EQU         $800000                 ; Max legal address for 512K machine
  75. maxMasters        EQU         $1000                    ; Ridiculously large allocation chunk size
  76. dfltMasters     EQU         32                        ; Default to 32 master pointers
  77.  
  78. ; Driver Status record definition
  79.  
  80. dsQType         EQU         $A
  81.                                                         ; not used [word]
  82. dsNeedsFlush    EQU         $13                     ; reserved [byte]
  83.  
  84. ;This variable was named RetryCount in SONYEqu
  85.  
  86. SONYRetry        EQU         5
  87. SonyVars        EQU         $134                    ; 3-1/2 disk driver vars [pointer]
  88. DskRtnAdr        EQU         $124                    ; temp for disk driver [pointer]
  89. PollRtnAddr     EQU         $128                    ; 'other' driver locals [pointer]
  90. PWMValue        EQU         $138                    ; current PWM value [word]
  91. PollStack        EQU         $13A                    ; SCC poll data start stack location [pointer]
  92. PollProc        EQU         $13E                    ; SCC poll data procedure [pointer]
  93. DiskVars        EQU         $222                    ; Disk driver variables [62 bytes]
  94.  
  95.  
  96. LastPGlobal     EQU         $954                    ; address of last printer global
  97.  
  98. ; QuickDraw Glue Vectors
  99.  
  100. JHideCursor     EQU         $800
  101. JShowCursor     EQU         $804
  102. JShieldCursor    EQU         $808
  103. JScrnAddr        EQU         $80C
  104. JScrnSize        EQU         $810
  105. JInitCrsr        EQU         $814
  106. JSetCrsr        EQU         $818
  107. JCrsrObscure    EQU         $81C
  108. JUpdateProc     EQU         $820
  109. LGrafJump        EQU         $824
  110. JSwapFont        EQU         $8E0                    ; jump entry for FMSwapFont [long]
  111. JFontInfo        EQU         $8E4                    ; jump entry for FMFontMetrics [long]
  112.  
  113. ; Miscellaneous Globals
  114.  
  115. SysCom            EQU         $100                    ; start of system communication area
  116. DispatchTab     EQU         $400                    ; A-Trap dispatch table [1024 bytes]
  117. OSTable         EQU         $0400                    ; 256 longs, up to $800, where old table of 512 words was
  118. toolDisp        EQU         10                        ; bit #10 distinguishes Tool/OS Get/Set Trap address
  119. oldDisp         EQU         9                        ; bit #9 distinguishes Old/New trap numbering
  120. ; moved HeapStart equate to hwequ file <C1/14Apr86>
  121. ; moved DoEject equate to hwequ file <C1/14Apr86>
  122.  
  123. FontFlag        EQU         $15E                    ; font manager loop flag [byte]
  124. JShell            EQU         $212                    ; journaling shell state [wprd]
  125. MacJmp            EQU         $120                    ; MACSBUG jumptable [pointer]
  126. MacJmpFlag        EQU         $BFF                    ; MacsBug flag [byte]
  127. FileVars        EQU         $340                    ; file system vars [184 bytes]
  128. LoadVars        EQU         $900                    ; loader variables [68 bytes]
  129. LastLGlobal     EQU         $944                    ; address past last loader global
  130. CoreEditVars    EQU         $954                    ; core edit variables [12 bytes]
  131. ScreenVars        EQU         $292                    ; Screen driver variables [8 bytes]
  132. SoundVars        EQU         $262                    ; Sound driver variables [32 bytes]
  133. BootGlobPtr     EQU         $DDC                    ; ptr to BootGlobs record at top of memory <2.9><3.2><3.3>
  134.  
  135. ; Font Manager Low Memory Globals
  136.  
  137. FOutError        EQU         $998                    ; error code
  138. FOutFontHandle    EQU         $99A                    ; handle to font bits
  139. FOutBold        EQU         $99E                    ; bolding factor
  140. FOutItalic        EQU         $99F                    ; italic factor
  141. FOutULOffset    EQU         $9A0                    ; underline offset
  142. FOutULShadow    EQU         $9A1                    ; underline halo
  143. FOutULThick     EQU         $9A2                    ; underline thickness
  144. FOutShadow        EQU         $9A3                    ; shadow factor
  145. FOutExtra        EQU         $9A4                    ; extra horizontal width
  146. FOutAscent        EQU         $9A5                    ; height above baseline
  147. FOutDescent     EQU         $9A6                    ; height below baseline
  148. FOutWidMax        EQU         $9A7                    ; maximum width of character
  149. FOutLeading     EQU         $9A8                    ; space between lines
  150. FOutUnused        EQU         $9A9                    ; unused byte (must have even number)
  151. FOutNumer        EQU         $9AA                    ; point for numerators of scale factor
  152. FOutDenom        EQU         $9AE                    ; point for denominators of scale factor
  153.  
  154. ;_______________________________________________________________________
  155. ;
  156. ; Toolbox Equates -- These equates supplement the high-level equates for the
  157. ; Macintosh toolbox software in ToolEqu.a. These equates are private
  158. ; to Apple Computer, Inc. and should be used solely for building system
  159. ; software.
  160. ;
  161. ;_______________________________________________________________________
  162.  
  163. DeskPort        EQU         $9E2                    ; Desk grafPort (Whole screen) [pointer]
  164.  
  165. ;_______________________________________________________________________
  166. ;
  167. ; QuickDraw Equates -- This file supplements the public equates for QuickDraw.
  168. ; found in the file QuickEqu.a These equates are private
  169. ; to Apple Computer, Inc. and should be used solely for building system
  170. ; software.
  171. ;
  172. ;_______________________________________________________________________
  173.  
  174. symbols         EQU         0
  175. forMac            EQU         1
  176.  
  177. ; Region State record
  178.  
  179. rgnPtr            EQU         $0                        ; [handle]
  180. dataPtr         EQU         $4                        ; [handle]
  181. scanBuf         EQU         $8                        ; [pointer]
  182. scanSize        EQU         $C                        ; [word]
  183. thisV            EQU         $E                        ; [word]
  184. nextV            EQU         $10                     ; [word]
  185. minH            EQU         $12                     ; [word]
  186. maxH            EQU         $14                     ; [word]
  187. leftH            EQU         $16                     ; [word]
  188. rgnRec            EQU         $18                     ; size of as region record
  189.  
  190. ;-----------------------------------------------------
  191. ;
  192. ; Offsets in a PicSave record:
  193. ;
  194. thePic            EQU         0                        ;PICHANDLE
  195. picMax            EQU         4                        ;LongInt
  196. picIndex        EQU         8                        ;LongInt
  197. picClipRgn        EQU         12                        ;RgnHandle
  198. picBkPat        EQU         16                        ;Pattern
  199. picTxFont        EQU         24                        ;WORD
  200. picTxFace        EQU         26                        ;Style
  201. picTxMode        EQU         28                        ;WORD
  202. picTxSize        EQU         30                        ;WORD
  203. picSpExtra        EQU         32                        ;Fixed Point
  204. picTxNumer        EQU         36                        ;Point
  205. picTxDenom        EQU         40                        ;Point
  206. picTxLoc        EQU         44                        ;Point
  207. picPnLoc        EQU         48                        ;Point
  208. picPnSize        EQU         52                        ;Point
  209. picPnMode        EQU         56                        ;WORD
  210. picPnPat        EQU         58                        ;Pattern
  211. picFillPat        EQU         66                        ;Pattern
  212. picTheRect        EQU         74                        ;Rect
  213. picOvSize        EQU         82                        ;Point
  214. picOrigin        EQU         86                        ;Point
  215. picFgColor        EQU         90                        ;Long
  216. picBkColor        EQU         94                        ;Long
  217. picSaveRec        EQU         98                        ;total size in bytes
  218.  
  219. ; Quickdraw privates
  220.  
  221. ; additional offsets in a PicSave record
  222.  
  223. picVersion        EQU         98                        ;WORD
  224. picRGBFgCol     EQU         100                     ;RGB (6 bytes)
  225. picRGBBkCol     EQU         106                     ;RGB (6 bytes)
  226. picChExtra        EQU         112                     ;WORD
  227. picLocHFrac     EQU         114                     ;WORD
  228. picRGBOpColor    EQU         116                     ;RGB (6 bytes)
  229. picRGBHiColor    EQU         122                     ;RGB (6 bytes)
  230. picFillPP        EQU         128                     ;Handle
  231. picPnPP         EQU         132                     ;Handle
  232. picBkPP         EQU         136                     ;Handle
  233. npicSaveRec     EQU         140                     ;total size in bytes
  234. pictVersion     EQU         1                        ;version number for pict
  235. npicVersion     EQU         $2FF                    ;version number for npic
  236.  
  237. ;-----------------------------------------------
  238. ;
  239. ; PICTURE OPCODES
  240. ;
  241.  
  242. opNOP            EQU         $0                        ; nop opcode
  243. opClip            EQU         $1                        ; clip opcode
  244. opBkPat         EQU         $2                        ; background pattern opcode
  245. opTxFont        EQU         $3                        ; text font opcode
  246. opTxFace        EQU         $4                        ; text face opcode
  247. opTxMode        EQU         $5                        ; text mode opcode
  248. opSpExtra        EQU         $6                        ; space extra opcode
  249. opPnSize        EQU         $7                        ; pen size opcode
  250. opPnMode        EQU         $8                        ; pen mode opcode
  251. opPnPat         EQU         $9                        ; pen pattern opcode
  252. opFillPat        EQU         $A                        ; fill pattern opcode
  253. opOvSize        EQU         $B                        ; oval size opcode
  254. opOrigin        EQU         $C                        ; origin opcode
  255. opTxSize        EQU         $D                        ; text size opcode
  256. opFgColor        EQU         $E                        ; foreground color opcode
  257. opBkColor        EQU         $F                        ; background color opcode
  258. opTxRatio        EQU         $10                     ; text ratio opcode
  259. opVersion        EQU         $11                     ; version opcode
  260. opBkPixPat        EQU         $12                     ; color background pattern opcode
  261. opPnPixPat        EQU         $13                     ; color pen pattern opcode
  262. opFillPixPat    EQU         $14                     ; color fill pattern opcode
  263. opPnLocHFrac    EQU         $15                     ; fractional pen position opcode
  264. opChExtra        EQU         $16                     ; extra for each character
  265.  
  266. ; opcode $17 unused
  267.  
  268. opIFore         EQU         $18                     ; foreColor index opcode
  269. opIBack         EQU         $19                     ; backColor index opcode
  270. opRGBFgCol        EQU         $1A                     ; RGB foreColor opcode
  271. opRGBBkCol        EQU         $1B                     ; RGB backColor opcode
  272. opHiliteMode    EQU         $1C                     ; hilite mode flag
  273. opHiliteColor    EQU         $1D                     ; RGB hilite color
  274. opDefHilite     EQU         $1E                     ; Use default hilite color
  275. opOpColor        EQU         $1F                     ; RGB OpColor for arithmetic modes
  276. opLine            EQU         $20                     ; line opcode
  277. opLineFrom        EQU         $21                     ; line from opcode
  278. opShortLine     EQU         $22                     ; short line opcode
  279. opShortLineFrom   EQU        $23                     ; short line from opcode
  280. opLongText        EQU         $28                     ; long text opcode
  281. opDHText        EQU         $29                     ; dh text opcode
  282. opDVText        EQU         $2A                     ; dv text opcode
  283. opDHDVText        EQU         $2B                     ; dh,dv text opcode
  284. opBitsRect        EQU         $90                     ; copybits, rect clipped opcode
  285. opBitsRgn        EQU         $91                     ; copybits, rgn clipped opcode
  286. opPackBitsRect    EQU         $98                     ; packed copybits, rect clipped opcode
  287. opPackBitsRgn    EQU         $99                     ; packed copybits, rgn clipped opcode
  288. opShortComment    EQU         $A0                     ; short comment opcode
  289. opLongComment    EQU         $A1                     ; long comment opcode
  290. opEndPic        EQU         $FF                     ; end of picture opcode
  291. ngHeaderOp        EQU         $0C00                    ; NuGraf Header opcode
  292. ;-----------------------------------------------
  293. ;
  294. ; COLOR QUICKDRAW EQUATES
  295. ;
  296.  
  297. rbMask            EQU         $1FFF                    ; mask top 3 bits of rowbytes
  298. pmFlag            EQU         $8000                    ; flag to say it's a new pixMap
  299. cPortFlag        EQU         $C000                    ; isPixMap+isCPort
  300. pixVersion        EQU         $0000                    ; isPixMap
  301. isPixMap        EQU         15                        ; for testing high bit of pRowbytes
  302. isCPort         EQU         14                        ; indicates that "bitmap" belongs to port
  303.  
  304.  
  305. ;for Mac+ Only - 2-way comm cmd
  306.  
  307. rDSync            EQU         0                        ; sync up w/each other
  308.  
  309. ; command byte from nub to MPS
  310.  
  311. rDSysErr        EQU         1                        ; system error
  312. rDTrapCall        EQU         2                        ; trap call
  313. rDDta            EQU         3                        ; data comin' down the road 
  314.  
  315. ; command byte from MPS to nub
  316.  
  317. rDGetN            EQU         1                        ; GetNBytes
  318. rDSetN            EQU         2                        ; SetNBytes
  319. rDCallProc        EQU         3                        ; CallProc
  320. rDSetAtrap        EQU         4                        ; SetATrap
  321. rDResume        EQU         5                        ; Resume execution
  322.  
  323. ; end Mac+ only
  324.  
  325.  
  326. FlEvtMask        EQU         $25E                    ; (word) mask of allowable events to flush at FlushEvents.
  327. TrapAgain        EQU         $B00                    ; use 4 bytes here for another trap
  328. PWMBuf1         EQU         $B0A                    ; (long) PWM buffer ptr
  329. BootMask        EQU         $B0E                    ; (word) needed during boot 
  330. AtalkHk1        EQU         $B14                    ; (long) Appletalk hook
  331. AtalkHk2        EQU         $B18                    ; (long) Appletalk hook
  332. UnSwitchedFlags   EQU        $B20                    ; (byte) special flags, not switched by multifinder <3.3>
  333. usRelTaskRun    EQU         7                        ;         bit 7=1 if Reliability Mgr mtbf task NOT installed <3.3>
  334. SwitchedFlags    EQU         $B21                    ; (byte) special flags, switched by multifinder
  335. SCSIFlag        EQU         $B22                    ; (word) Configuration Flag for SCSI
  336. HWCfgFlags        EQU         SCSIFlag                ; (word) HW Configuration flags 
  337. ; bit 15 - SCSI port present
  338. ; bit 14 - New Clock Chip Present
  339. ; bit 13 - Extra Parameter Ram Valid at boottime.
  340.  
  341. BtDskRfn        EQU         $B34                    ; (word) refnum for boot drive driver refnum
  342. BootTmp8        EQU         $B36                    ; (8bytes) temp space needed by StartBoot
  343. T1Arbitrate     EQU         $B3F                    ; (byte) $FF if Timer T1 up for grabs.
  344. RMGRHiVars        EQU         $B80                    ; $B80-$BFF are switched vars
  345. ; RMGR vars extend $B80 through $B9F
  346.  
  347. NewUnused        EQU         $BC0                    ; (word) - used to be FlEvtMask
  348. FmtDefaults     EQU         52+$36A                 ; ptr to formatting defs (TFSVars + 52) [long]
  349.  
  350. ; addresses of TE hooks installed in trap table
  351.  
  352. TETrimMeasure    EQU         (4*253+OSTable)         ; trimMeasure hook
  353. TEFindWord        EQU         (4*254+OSTable)         ; findWord hook
  354. TEFindLine        EQU         (4*255+OSTable)         ; findLine hook
  355. JBlockMove        EQU         $4B8                    ; Special equate for OUR HeapGuts Jump Table
  356. JInsTime        EQU         (600-512)*4+OSTable     ;
  357. JRmvTime        EQU         (601-512)*4+OSTable     ;
  358. JPrimeTime        EQU         (602-512)*4+OSTable     ;
  359. JADBop            EQU         ($7C*4)+OSTable         ; OS trap table entry for _ADBop
  360. JIOPMsgRequest    EQU         ($87*4)+OSTable         ; OS trap table entry for _IOPMsgRequest
  361. JLg2Phys        EQU         (703-512)*4+OSTable     ;
  362. JFlushCache     EQU         (704-512)*4+OSTable     ;
  363. JGetBlock        EQU         (705-512)*4+OSTable     ;
  364. JMarkBlock        EQU         (706-512)*4+OSTable     ;
  365. JRelBlock        EQU         (707-512)*4+OSTable     ;
  366. JTrashBlocks    EQU         (708-512)*4+OSTable     ;
  367. JTrashVBlks     EQU         (709-512)*4+OSTable     ;
  368. JCacheWrIP        EQU         (710-512)*4+OSTable     ;
  369. JCacheRdIP        EQU         (711-512)*4+OSTable     ;
  370.  
  371.  
  372. JBasicIO        EQU         (712-512)*4+OSTable     ;
  373. JRdBlocks        EQU         (713-512)*4+OSTable     ;
  374. JWrBlocks        EQU         (714-512)*4+OSTable     ;
  375. JSetUpTags        EQU         (715-512)*4+OSTable     ;
  376. JBTClose        EQU         (716-512)*4+OSTable     ;
  377. JBTDelete        EQU         (717-512)*4+OSTable     ;
  378. JBTFlush        EQU         (718-512)*4+OSTable     ;
  379. JBTGetRecord    EQU         (719-512)*4+OSTable     ;
  380. JBTInsert        EQU         (720-512)*4+OSTable     ;
  381. JBTOpen         EQU         (721-512)*4+OSTable     ;
  382. JBTSearch        EQU         (722-512)*4+OSTable     ;
  383. JBTUpdate        EQU         (723-512)*4+OSTable     ;
  384. JGetNode        EQU         (724-512)*4+OSTable     ;
  385. JRelNode        EQU         (725-512)*4+OSTable     ;
  386. JAllocNode        EQU         (726-512)*4+OSTable     ;
  387. JFreeNode        EQU         (727-512)*4+OSTable     ;
  388. JExtBTFile        EQU         (728-512)*4+OSTable     ;
  389. JDeallocFile    EQU         (729-512)*4+OSTable     ;
  390. JExtendFile     EQU         (730-512)*4+OSTable     ;
  391. JTruncateFile    EQU         (731-512)*4+OSTable     ;
  392. JCMSetUp        EQU         (732-512)*4+OSTable     ;
  393. JDtrmV1         EQU         (734-512)*4+OSTable     ;
  394. JBlkAlloc        EQU         (735-512)*4+OSTable     ;
  395. JBlkDeAlloc     EQU         (736-512)*4+OSTable     ;
  396. JFileOpen        EQU         (737-512)*4+OSTable     ;
  397. JPermssnChk     EQU         (738-512)*4+OSTable     ;
  398. JFndFilName     EQU         (739-512)*4+OSTable     ;
  399. JRfNCall        EQU         (740-512)*4+OSTable     ;
  400. JAdjEOF         EQU         (741-512)*4+OSTable     ;
  401. JFileClose        EQU         (745-512)*4+OSTable     ; $7a4 <dnf v2.6>
  402. JFileRead        EQU         (746-512)*4+OSTable     ; $7a8 <dnf v2.6>
  403. JFileWrite        EQU         (747-512)*4+OSTable     ; $7ac <dnf v2.6>
  404.  
  405.  
  406. JClkNoMem        EQU         (595-512)*4+OSTable     ;vector for clock
  407.  
  408.  
  409. JSegStack        EQU         (760-512)*4+OSTable     ;vector for segment loader
  410.  
  411. ; vectors for RMGR low levels routines
  412. JSuperLoad        EQU         (761-512)*4+OSTable     ;
  413. JCmpFrm         EQU         (762-512)*4+OSTable     ;
  414. JNewMap         EQU         (763-512)*4+OSTable     ;
  415. JCheckLoad        EQU         (764-512)*4+OSTable     ;
  416. JRMgrStdEntry    EQU         ($A6*4)+OSTable         ;vector for standard entry routine
  417. JRMgrStdExit    EQU         ($A7*4)+OSTable         ;vector for standard exit routine
  418.  
  419.  
  420. ;_______________________________________________________________________
  421. ;
  422. ; heap flags
  423.  
  424. checking        EQU         0                        ;check arguments and data structures
  425. statistics        EQU         0                        ;gather statistics on usage 
  426. robust            EQU         0                        ;enables super-robust internal checks
  427. countMPs        EQU         0                        ;enables counting of master pointers
  428. dfltFlags        EQU         0                        ;Checking is on when zone is init'd 
  429. nOSTable        EQU         $0400                    ; 256 longs, up to $800
  430. JMtCheck        EQU         ($AF)*4+nOSTable        ; ($A0AF) $0400 is n/OSTable
  431. JCheckReMount    EQU         ($B0)*4+nOSTable        ; ($A0B0) $0400 is n/OSTable
  432. JDtrmV2         EQU         ($B1)*4+nOSTable        ; ($A0B1) $0400 is n/OSTable
  433. JFindDrive        EQU         ($B2)*4+nOSTable        ; ($A0B2) $0400 is n/OSTable
  434. JFClose         EQU         ($B3)*4+nOSTable        ; ($A0B3) $0400 is n/OSTable
  435. JFlushMDB        EQU         ($B4)*4+nOSTable        ; ($A0B4) $0400 is n/OSTable
  436. JGoDriver        EQU         ($B5)*4+nOSTable        ; ($A0B5) $0400 is n/OSTable
  437. JWaitUntil        EQU         ($B6)*4+nOSTable        ; ($A0B6) $0400 is n/OSTable
  438. JSyncWait        EQU         ($B7)*4+nOSTable        ; ($A0B7) $0400 is n/OSTable
  439. JSoundDead        EQU         ($B8)*4+nOSTable        ; ($A0B8) $0400 is n/OSTable
  440. JDisptch        EQU         ($B9)*4+nOSTable        ; ($A0B9) $0400 is n/OSTable
  441. ;JStartinit EQU ($B9)*4+nOSTable ; ($A0B9) $0400 is n/OSTable <C681><C811>
  442. JIAZInit        EQU         ($BA)*4+nOSTable        ; ($A0BA) $0400 is n/OSTable
  443. JIAZPostInit    EQU         ($BB)*4+nOSTable        ; ($A0BB) $0400 is n/OSTable
  444. JLaunchInit     EQU         ($BC)*4+nOSTable        ; ($A0BC) $0400 is n/OSTable
  445. JCacheFlush     EQU         ($BD)*4+nOSTable        ; ($A0BD) $0400 is n/OSTable
  446. JStripAddress    EQU         ($55)*4+nOSTable        ; ($A055) $0400 is n/OSTable  <v1.7>
  447. JjSwapMMU        EQU         ($5D)*4+nOSTable        ; ($A05D) $0400 is n/OSTable  <v2.1>
  448. JTranslate24to32  EQU        ($91)*4+nOSTable        ; ($A091) $0400 is n/OSTable  <v3.4>
  449.  
  450. ;_______________________________________________________________________
  451. ;
  452. ; addresses of TE hooks installed in trap table for new color text edit <C144>
  453.  
  454. JPixel2Char     EQU         (742-512)*4+nOSTable    ; ($A0E6) $0400 is nOSTable 
  455. JChar2Pixel     EQU         (743-512)*4+nOSTable    ; ($A0E7) $0400 is nOSTable 
  456. JHiliteText     EQU         (744-512)*4+nOSTable    ; ($A0E8) $0400 is nOSTable 
  457.  
  458. ;_______________________________________________________________________
  459. ;
  460. ; tfs vectors <A281>
  461. JUpdAltMDB        EQU         ($ED)*4+nOSTable        ; ($A0ED) $0400 is n/OSTable
  462. JCkExtFS        EQU         ($EE)*4+nOSTable        ; ($A0EE) $0400 is n/OSTable
  463. JDTrmV3         EQU         ($EF)*4+nOSTable        ; ($A0EF) $0400 is n/OSTable
  464. JBMChk            EQU         ($F0)*4+nOSTable        ; ($A0F0) $0400 is n/OSTable
  465. JTstMod         EQU         ($F1)*4+nOSTable        ; ($A0F1) $0400 is n/OSTable
  466. JLocCRec        EQU         ($F2)*4+nOSTable        ; ($A0F2) $0400 is n/OSTable
  467. JTreeSearch     EQU         ($F3)*4+nOSTable        ; ($A0F3) $0400 is n/OSTable
  468. JMapFBlock        EQU         ($F4)*4+nOSTable        ; ($A0F4) $0400 is n/OSTable
  469. JXFSearch        EQU         ($F5)*4+nOSTable        ; ($A0F5) $0400 is n/OSTable
  470. JReadBM         EQU         ($F6)*4+nOSTable        ; ($A0F6) $0400 is n/OSTable
  471.  
  472. ; other equs
  473.  
  474. talkCmd         EQU         $0C                     ; Command for Talk R0
  475. listenCmd        EQU         $08                     ; Command for Listen R0 
  476. kbdAddr         EQU         $02                     ; keyboard type device
  477. mouseAddr        EQU         $03                     ; mouse type device 
  478. numFDBAdr        EQU         $10                     ; number of avaiblae FDB address
  479. bcMask            EQU         $00FFFFFF                ; Mask for the 24 bit Byte Count
  480. GrafBegin        EQU         $800                    ; graf global area
  481. GrafEnd         EQU         $8F2                    ; end of graphics globals
  482.  
  483. ;Font Manager
  484.  
  485. ; additional private low memory globals
  486.  
  487. SaveFondFlags    EQU         $986                    ;important byte from current FOND flags
  488. FondState        EQU         $903                    ;saved FOND purge state
  489.  
  490. ; additional private low memory globals for nuMac’s and later <C346>
  491.  
  492. SynListHandle    EQU         $0D32                    ;a handle to a list of synthesized fonts
  493. LastFore        EQU         $0D36                    ;8 bytes: last foreground and background colors (FM)
  494. LastMode        EQU         $0D3E                    ;word: last text mode (Font Manager)
  495. LastDepth        EQU         $0D40                    ;word: last depth font prepared for
  496. FMExist         EQU         $0D42                    ;byte: clear if InitFonts has already been called
  497. SavedHilite     EQU         $0D43                    ;byte: used for state across Mac II QD patches
  498.  
  499.  
  500. ;------------------
  501. ; fields within patXMap
  502.  
  503. patXRow         EQU         $00                     ; [word] rowbytes of expanded pattern
  504. patXHMask        EQU         $02                     ; [word] horizontal mask
  505. patXVMask        EQU         $04                     ; [word] vertical mask
  506. LastCTable        EQU         $06                     ; [long] seed value for last color table
  507. LastOfst        EQU         $0A                     ; [word] last global-local offset
  508. LastInvert        EQU         $0C                     ; [long] last invert value
  509. LastAlign        EQU         $10                     ; [long] last horizontal align
  510. LastStretch     EQU         $14                     ; [word] last stretch
  511. ppXInfo         EQU         $16                     ; size of expanded data
  512.  
  513. ; Offsets into boot blocks
  514.  
  515. bbID            EQU         0                        ; (word) offset to boot blocks ID
  516. bbEntry         EQU         2                        ; (contains BRA.S) entrypoint to boot blocks
  517. bbVersion        EQU         6                        ; (word) version number
  518. bbPageFlags     EQU         8                        ; (word) page 2 usage flags
  519. bbSysName        EQU         $0A                     ; system resource code file name (byte length + 0-15 chars)
  520. bbShellName     EQU         $1A                     ; system shell file name ('Finder')
  521. bbDbg1Name        EQU         $2A                     ; debugger file name (first load)
  522. bbDbg2Name        EQU         $3A                     ; debugger file name (second load)
  523. bbScreenName    EQU         $4A                     ; boot screen file name
  524. bbHelloName     EQU         $5A                     ; startup program file name
  525. bbScrapName     EQU         $6A                     ; system scrap file name
  526. bbCntFCBs        EQU         $7A                     ; (word) # of FCBs to allocate (determines max open files)
  527. bbCntEvts        EQU         $7C                     ; (word) # of event queue elements to allocate
  528. bb128KSHeap     EQU         $7E                     ; size of system heap on a 128K Mac (no longer used)
  529. bb256KSHeap     EQU         $82                     ; size of system heap on a 256K Mac (no longer used)
  530. bb512KSHeap     EQU         $86                     ; size of system heap on a 512K Mac
  531. bbSysHeapSize    EQU         $86                     ; (long) absolute size of the system heap (for all machines).
  532. ; (word) unused - reserved
  533. bbSysHeapExtra    EQU         $8C                     ; (long) minimum additional system heap space required.
  534. bbSysHeapFract    EQU         $90                     ; (long) fraction of memory available to be used for sys heap.
  535.  
  536.  
  537. ; The version number of the boot blocks affects the interpretation of the system heap size:
  538. ;
  539. ; if (BBVersion) <= BBOldVers then
  540. ; System heap size becomes DefSysHeapSize (see HWEqu).
  541. ;
  542. ; if BBOldVers < (BBVersion) < BBNewVers then
  543. ; if (BBVersion) = execBBvers then
  544. ; Executes boot blocks starting at BBEntry.
  545. ; System heap size becomes (BBSysHeapSize) (if it isn't already bigger).
  546. ;
  547. ; if BBNewBit is set in (BBVersion) then
  548. ; if BBExecBit is set then
  549. ; Executes boot blocks starting at BBEntry.
  550. ; if BBRelBit is cleared then
  551. ; System heap size becomes (BBSysHeapSize) (if it isn't already bigger)
  552. ; if BBRelBit is set then
  553. ; System heap is extended by BBSysHeapExtra + (BBSysHeapFract * (MemTop))
  554.  
  555. ; Values for boot blocks.
  556. bbOldVers        EQU         $14                     ; really old versions of boot blocks are <= this
  557. bbOldExecVers    EQU         'D'                     ; old version for executable boot blocks
  558.  
  559. ; Bits for new boot blocks:
  560. bbNewBit        EQU         7                        ; set to indicate the use of the new format
  561. bbExecBit        EQU         6                        ; set to indicate dispatchable boot blocks
  562. bbRelBit        EQU         5                        ; set to indicate relative heap size specification
  563. ; bits 4 through 0 are reserved for future use by Apple and must be cleared.
  564.  
  565. ; Corresponding values
  566. bbNewMask        EQU         $80                     ; new boot blocks use #'s >= this
  567. bbExecMask        EQU         $40                     ;
  568. bbRelMask        EQU         $20                     ;
  569.  
  570. ; inverse Table structure (shouldn't be a public structure, but is obvious) 
  571. iTabSeed        EQU         $0                        ;[long] ID of owning color table
  572. iTabRes         EQU         $4                        ;[word] client ID
  573. iTTable         EQU         $6                        ;table of indices starts here
  574. iTabHidden        EQU         $00                     ;number of hidden entries (0 for balanced table)
  575. iTabReserved    EQU         $02                     ;space for a handle or pointer to other info
  576. iTabInfo        EQU         $06
  577. iTExtraSize     EQU         $106                    ;1 byte per color at the moment
  578. ;-----------------------------------------------------
  579. ;
  580. ; EQUATES FOR COLOR CURSOR SAVE AREA
  581. ;
  582. ; NOTE THAT THE FIRST FOUR FIELDS ARE PARALLEL TO THE FIRST FOUR FIELDS
  583. ; OF A PATTERN SO THAT PATCONVERT CAN BE USED TO EXPAND A CURSOR
  584. ;
  585. ccType            EQU         0                        ;[WORD] CURSOR TYPE
  586. ccMap            EQU         ccType+2                ;[LONG] HANDLE TO CURSOR'S PIXMAP
  587. ccData            EQU         ccMap+4                 ;[LONG] HANDLE TO CURSOR'S COLOR DATA
  588. ccXData         EQU         ccData+4                ;[LONG] HANDLE TO EXPANDED DATA
  589. ccXMask         EQU         ccXData+4                ;[LONG] HANDLE TO EXPANDED MASK
  590. ccSave            EQU         ccXMask+4                ;[LONG] HANDLE TO SAVE BITS UNDER CURSOR
  591. ccLastCrsr        EQU         ccSave+4                ;[32 BYTES] DATA FOR LAST B/W CURSOR DRAWN
  592. ccID            EQU         ccLastCrsr+32            ;[LONG] ID FOR LAST COLOR CURSOR DRAWN
  593. ccDepth         EQU         ccID+4                    ;[WORD] DEPTH FOR LAST CURSOR DRAWN
  594. ccStateRegs     EQU         ccDepth+2                ;[16 BYTES] STATE INFO OF SAVED DATA
  595. ccBytes         EQU         ccStateRegs+16            ;[WORD] ROWBYTES OF EXPANDED DATA
  596. ccMaxDepth        EQU         ccBytes+2                ;[WORD] MAXIMUM SCREEN DEPTH
  597. ccSaveRec        EQU         ccMaxDepth+2            ;SIZE OF CURSOR SAVE AREA
  598. ;----------------------------------------------
  599. ;
  600. ; Trap table equates used by QuickDraw:
  601. ;
  602. JStdTbTbl        EQU         $0E00
  603. JStdArc         EQU         JStdTbTbl+(4*$BD)
  604. JStdBits        EQU         JStdTbTbl+(4*$EB)
  605. JStdComment     EQU         JStdTbTbl+(4*$F1)
  606. JStdGetPic        EQU         JStdTbTbl+(4*$EE)
  607. JStdLine        EQU         JStdTbTbl+(4*$90)
  608. JStdOval        EQU         JStdTbTbl+(4*$B6)
  609. JStdPoly        EQU         JStdTbTbl+(4*$C5)
  610. JStdPutPic        EQU         JStdTbTbl+(4*$F0)
  611. JStdRect        EQU         JStdTbTbl+(4*$A0)
  612. JStdRgn         EQU         JStdTbTbl+(4*$D1)
  613. JStdRRect        EQU         JStdTbTbl+(4*$AF)
  614. JStdText        EQU         JStdTbTbl+(4*$82)
  615. JStdTxMeas        EQU         JStdTbTbl+(4*$ED)
  616. JStdOpcode        EQU         JStdTbTbl+(4*$3F8)
  617.                 MACRO
  618.                 _StackAvail
  619.                 MOVE.L        $400+4*$65,A0            ;get address of stack space routine
  620.                 JSR         (A0)                    ;get stack space into D0 and return
  621.                 ENDM
  622.                 MACRO
  623.                 _GetScreenBits                        ; it's in crsrcore!!
  624.                 DC.W        ($A833)                 ;new trap number
  625.                 ENDM
  626. ; Power Manager Data Structures
  627.  
  628.  
  629. pmCommand        EQU         0                        ; Power manager parameter block
  630. pmLength        EQU         pmCommand+2             ;Power manager parameter block
  631. pmSBuffer        EQU         pmLength+2                ;Power manager parameter block
  632. pmRBuffer        EQU         pmSBuffer+4             ;Power manager parameter block
  633. contrast        EQU         $40                     ;Power Manager parameter block - Screen contrast control
  634. modemRead        EQU         $58                     ;Power Manager parameter block - Internal modem setup
  635. batteryRead     EQU         $68                     ;Power Manager parameter block - Battery/charger level and status
  636. ; equates for dynamic menuList structure
  637. ;
  638. ;----- Part 1 -- regular menus
  639. mbResID         EQU         4                        ; menuBar variant offset in menuList [word]
  640. menu1Size        EQU         mbResID + 2             ; Must be = 6 forever!!!
  641.  
  642. ;----- Part 2 -- hierarchical menus
  643. lastHMenu        EQU         0                        ; offset in HMenu part of dynamic menuList [word]
  644. menuTitleSave    EQU         lastHMenu + 2            ; handle to saved bits behind title rectangle [handle]
  645. menu2Size        EQU         menuTitleSave+4         ; size of HMenu entry
  646. menuHoH         EQU         0                        ; hierarchical menu [handle]
  647.  
  648. ;----- Size of menuList at InitMenus time -- no menus, no hierarchical menus
  649. initMListSize    EQU         menu1Size + menu2Size
  650. ; equates for mbarproc's save structure created when it receives Init Msg (Msg #3)
  651. ;
  652. ;----- Header
  653. lastMBSave        EQU         0                        ; offset to last menu saved in structure [word]
  654. mbCustomStorage   EQU        lastMBSave + 2            ; private storage for custom mbarproc's [handle]
  655. mbItemRect        EQU         mbCustomStorage + 4     ; rect of currently chosen menu item [rect]
  656. mbMenuDelay     EQU         mbItemRect + 8            ; get MenuDelay from paramram and store here [byte]
  657. mbMenuDrag        EQU         mbMenuDelay + 1         ; get MenuDrag from paramram and store here [byte]
  658. mbUglyScroll    EQU         mbMenuDrag + 1            ; flag to tell whether HMenu has been brought [word]
  659. ; before scrolling happens
  660. mbIconState     EQU         mbUglyScroll + 2        ; Place to save NMgr icon state
  661. mbHeader        EQU         mbIconState + 2         ; size of mb save header [$14]
  662. ; !!!!! CAUTION: mbHeader MUST be smaller than mbEntrySize !!!!!
  663.  
  664. ;----- Entry
  665. mbRectSave        EQU         0                        ; rectangle of menu on screen [8 bytes]
  666. mbBitsSave        EQU         mbRectSave + 8            ; handle to saved bits behind menu rectangle
  667. mbMenuDir        EQU         mbBitsSave + 4            ; direction menu was placed on screen,
  668. ; to right or left of title (if first menu) 
  669. ; or previous menu (if hierarchical menu)
  670. mbMLOffset        EQU         mbMenuDir + 2            ; 6 byte offset of menu in menuList [word]
  671. mbMLHandle        EQU         mbMLOffset + 2            ; handle of menu in menuList
  672. mbTopScroll     EQU         mbMLHandle + 4            ; top scrolled to menu item, from global topMenuItem [word]
  673. mbBotScroll     EQU         mbTopScroll + 2         ; bottom scrolled to menu item, from global atMenuBottom [word]
  674. mbReserved        EQU         mbBotScroll + 2         ; reserved field [long]
  675. mbEntrySize     EQU         mbReserved + 4
  676. mbSaveSize        EQU         mbEntrySize*6            ; x-byte header and 5 entries of x-bytes each
  677. firstAltMenuCmd   EQU        $1B
  678. altMenuCmd1     EQU         $1D                     ; itemCmd == $1D ==> unused indicator reserved for future Apple use
  679. altMenuCmd2     EQU         $1E                     ; itemCmd == $1E ==> unused indicator reserved for future Apple use
  680. altMenuCmd3     EQU         $1F                     ; itemCmd == $1F ==> unused indicator reserved for future Apple use
  681. lastAltMenuCmd    EQU         $1F
  682. mbRightDir        EQU         0                        ; menu went to the right (direction)
  683. mbLeftDir        EQU         1                        ; menu went to the left (direction)
  684. menuDelay        EQU         $7E                     ; param ram locations for user settable
  685. menuDrag        EQU         $7F                     ; hierarchical menu delay and drag ticks
  686.  
  687.                 MACRO
  688.                 _GetWaitFlags
  689.                 MOVEA.W     #2,A0
  690.                 _InternalWait
  691.                 ENDM
  692.  
  693.                 MACRO
  694.                 _SetWaitFlags
  695.                 MOVEA.W     #3,A0
  696.                 _InternalWait
  697.                 ENDM
  698.  
  699.                 MACRO
  700.                 _DisableDynWait
  701.                 MOVEA.W     #4,A0
  702.                 _InternalWait
  703.                 ENDM
  704.  
  705.                 MACRO
  706.                 _EnableDynWait
  707.                 MOVEA.W     #5,A0
  708.                 _InternalWait
  709.                 ENDM
  710.  
  711.                 MACRO
  712.                 _DisablePermWait
  713.                 MOVEA.W     #6,A0
  714.                 _InternalWait
  715.                 ENDM
  716.  
  717.                 MACRO
  718.                 _EnablePermWait
  719.                 MOVEA.W     #7,A0
  720.                 _InternalWait
  721.                 ENDM
  722.  
  723. ; _AssumeEq Arg1, Arg2 -- macro to generate a compile-time error if two <01Oct85>
  724. ; arguments are unequal. <01Oct85>
  725.  
  726.                 MACRO
  727.                 _AssumeEq
  728.                 IF            &EVAL(&SysList[1]) <> &EVAL(&SysList[2]) THEN
  729.                 ERR                                 ; Invalid statement - will cause error
  730.                 ENDIF
  731.                 ENDM
  732.  
  733.  
  734. ; sleep queue commands
  735. SleepRequest    EQU         1                        ; sleep request
  736. SleepDemand     EQU         2                        ; Sleep Demand
  737. SleepWakeUp     EQU         3                        ; wake up
  738.  
  739. ; Sleep Queue Flags - SleepqFlags
  740. NoCalls         EQU         1                        ; no need to call
  741. NoRequest        EQU         2                        ; no need to send sleep request
  742.  
  743.  
  744.                 ENDIF                                ;end exclusion of private information
  745.  
  746. ;-------------------------------------------------------------------
  747. ;
  748. ; Time Manager Local Variable Struct
  749. ;
  750.  
  751. TTInt            EQU         0                        ; time of this interrupt cycle [long]
  752. TTAppoint        EQU         4                        ; pointer to next appointment in MSQueue [long]
  753. MSQueue         EQU         8                        ; queue header for MS Queue [10 bytes]
  754. MSLSize         EQU         18                        ; size of these variables for allocation purposes
  755. TimeVars        EQU         $0                        ; the low memory pointer to the variable struct
  756. msLink            EQU         0                        ; Link to next element [pointer]
  757. msType            EQU         4                        ; Unique ID for validity [word]
  758. msAddr            EQU         6                        ; service routine [pointer]
  759. msCount         EQU         10                        ; timeout count [word]
  760. msQSize         EQU         14
  761.